package com.sugar.psych.assessment.module.business.controller.admin.usermedal;

import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;

import com.sugar.psych.assessment.framework.common.pojo.PageParam;
import com.sugar.psych.assessment.framework.common.pojo.PageResult;
import com.sugar.psych.assessment.framework.common.pojo.CommonResult;
import com.sugar.psych.assessment.framework.common.util.object.BeanUtils;
import static com.sugar.psych.assessment.framework.common.pojo.CommonResult.success;

import com.sugar.psych.assessment.framework.excel.core.util.ExcelUtils;

import com.sugar.psych.assessment.framework.apilog.core.annotation.ApiAccessLog;
import static com.sugar.psych.assessment.framework.apilog.core.enums.OperateTypeEnum.*;

import com.sugar.psych.assessment.module.business.controller.admin.usermedal.vo.*;
import com.sugar.psych.assessment.module.business.dal.dataobject.usermedal.UserMedalDO;
import com.sugar.psych.assessment.module.business.service.usermedal.UserMedalService;

@Tag(name = "管理后台 - 用户获得勋章信息")
@RestController
@RequestMapping("/business/user-medal")
@Validated
public class UserMedalController {

    @Resource
    private UserMedalService userMedalService;

    @GetMapping("/get")
    @Operation(summary = "获得用户获得勋章信息")
    public CommonResult<List<UserMedalRespVO>> getUserAllGetMedal(@RequestParam("userId") Long userId) {
        return success(userMedalService.getUserAllGetMedal(userId));
    }
}